package com.xs.valid.demo.common;


/**
 * Restful 枚举异常
 *
 * @author www
 */
public enum RestEnum {
    SUCCESS(200, "成功"),

    /**
     * @4000-5000都是客户端错误
     */
    PARAMETER_INVALID(4000, "亲，参数错误哦，请联系前端小哥哥"),
    DO_NOT_HAVE_PERMISSION(4001, "您无权限访问"),
    USER_TOKEN_ERROR(4002, "登录已失效，请重新登录"),

    EMAIL_INVALID(4003, "邮箱格式非法"),
    USER_EMAIL_NOT_EXIST(4004, "用户邮箱不存在"),
    USER_NOT_EXIST(4005, "用户不存在"),
    USER_PASSWORD_MISTAKE(4006, "用户密码错误"),
    CUSTOMER_MODIFY_FAIL(4007, "客户信息修改失败"),
    BRANCH_PAYED_WAGES(4008, "门店已发放工资"),
    Email_Auth_Failed(4009, "邮件下发失败，请检查您的邮箱地址是否填写正确"),
    BATCH_HAD_SUBMIT(4010, "该批次已提交,如需修改请联系主管退回"),
    BATCH_HAD_GATHER(4011, "该批次已汇总"),
    WORKERS_NOT_GENERATE_INCREASED(4012, "你还没有生成增减员，非法操作"),
    BATCH_NOT_EXIST(4013, "该批次不存在"),
    DATE_BEYOUND_A_MONTH(4014, "入职日期距今超过一个月，请确认日期是否正确，没错请忽略该提示"),
    CARD_NUM_ERROR(4015, "身份证格式错误"),
    BRANCH_NOT_EXIST(4016, "系统中没有录入该门店"),
    LAST_DATAS_NOT_EXIST(4017, "上周数据不存在"),
    WITHOUT_APPROVE(4018, "转正，晋升，转岗，需要通过岗位认证"),
    WITHOUT_PERMISSON(4019, "没有修改权限(主管和薪资权限可以操作)"),
    /**
     * @5000以上都是服务端错误
     */
    SERVICE_ERROR(5000, "服务器错误"),
    READFILE_ERROR(5001, "文件读取失败，请重新选择文件"),

    DELETE_FAIL(5002, "删除失败"),
    UPDATE_FAIL(5003, "修改失败"),

    NOT_HAVE_BRANCHNO(5004, "您没有门店，无法操作"),

    MethodsOverdue(6000, "该功能已过期，请采用新的功能替换方案"),

    NotHaveOpenTimeException(6001, "您没有门店，无法操作"),

    RepeatSubmit(9998, "重复提交"),

    OTHERS(9999, "其他异常");//自定义异常


    private int status;
    private String message;

    RestEnum(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public int getStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }
}
